image_color(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

✨ image_color(3) ✨

okay bestie, welcome to the image_color page β€” this is part of the Arcan Lua API and it's the glow-up button for your surfaces πŸ’…


πŸŽ€ NAME πŸŽ€

image_color β€” change the color_surface and the rendertarget clear-color, no cap.


✨ SYNOPSIS ✨

it hands you back true or false, and it comes in two flavours:

image_color( vid:dst, number:red, number:green, number:blue )
image_color( vid:dst, number:red, number:green, number:blue,
number:alpha )

πŸ¦‹ DESCRIPTION πŸ¦‹

so there are literally two whole uses for this function, and both are iconic:

  • the first one: it updates the current color that a color_surface uses as the color value that gets passed to the shader πŸ‘‘
  • the second one: every rendertarget β€” and yes, that includes the sneaky one hiding behind WORLDID πŸ™ˆ β€” has a clear color, which is basically its default "background" color. it initialises to 25, 25, 25, (255), which is a dark grey vibe, but you can update it whenever you want with this function 🎨

πŸ“ NOTES πŸ“

  1. trying to set this on a surface that's not a rendertarget and is textured? that's a terminal state transition β€” like, fr fr, do not do that πŸ’€

🌸 EXAMPLE 🌸

function image_color0()
      local a = color_surface(64, 64, 255, 0, 0);
      show_image(a);
      image_color(a, 0, 255, 0);
end

🌈 EXAMPLE 🌈

function image_color1()
      image_color(WORLDID, 255, 0, 0, 0);
end

πŸ’€ MISUSE πŸ’€

bestie. no. 😭

function image_color0()
      image_color(BADID);
end

πŸ™ˆ MISUSE πŸ™ˆ

this one is giving "I didn't read the notes" energy:

function image_color1()
      local img = fill_surface(64, 64, 0, 0, 0);
      image_color(img, 255, 0, 0, 0);
end

🫢 SEE ALSO 🫢


okay that's the whole page, you ate that πŸ“ go forth and color your little hearts out πŸ’–

this has been the image manual, October 2026 edition, image_color(3) β€” mwah, ily, bye πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from