-- SOLVED --
The last flag in Image.create needed to be 4 so that the channel for colors exists.
I'm working on a pixel based world map for my game. To make it, I need to create an image and set it to the texture of a textureRect. To start it, I was going to use the Image.fill() function to set a base blue background. But the only colors I can get are blank white or black, no matter the color I set it to fill.
Here's my code
extends Control
@onready var texture = $TextureRect
func _ready():
var map = Image.create(50, 50, false, 0)
map.fill(Color.CORNFLOWER_BLUE)
texture.texture.set_image(map)
I've set the color to be the RGBA value for cornflower blue, other blues, and to Color(0, 0, 0, 1), and the only one that made it anything other then white was Color(0, 0, 0, 1), or pure black.
To be clear, texture is a TextureRect with the texture set to be a blank, default ImageRect.
Thanks for the help!