Skip to content

Commit

Permalink
fixed wrong color getting stored in array (similar fix to #1108.)
Browse files Browse the repository at this point in the history
  • Loading branch information
Variable-ind committed Nov 26, 2024
1 parent dc000f7 commit 1b8301a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Classes/ImageExtended.gd
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ func update_palette() -> void:
palette.resize(current_palette.colors_max)
palette.fill(TRANSPARENT)
for i in current_palette.colors:
palette[i] = current_palette.colors[i].color
# Due to the decimal nature of the color values, some values get rounded off
# unintentionally.
# Even though the decimal values change, the HTML code remains the same after the change.
# So we're using this trick to convert the values back to how they are shown in
# the palette.
palette[i] = Color(current_palette.colors[i].color.to_html())


## Displays the actual RGBA values of each pixel in the image from indexed mode.
Expand Down

0 comments on commit 1b8301a

Please sign in to comment.