Skip to content

Instantly share code, notes, and snippets.

@Xrayez
Last active April 16, 2023 12:01
Show Gist options
  • Save Xrayez/eda8ce709347b0083ad02c5c16c5d0ec to your computer and use it in GitHub Desktop.
Save Xrayez/eda8ce709347b0083ad02c5c16c5d0ec to your computer and use it in GitHub Desktop.
Lua colors, 0.25 step
-- Uses 0.25 step between shades of color, a total of 23 colors.
-- Assumes `color` to be already implemented as a callable table or a function.
local colors = {
color(1.0, 0.0, 0.0),
color(1.0, 0.25, 0.0),
color(1.0, 0.5, 0.0),
color(1.0, 0.75, 0.0),
color(0.75, 1.0, 0.0),
color(0.5, 1.0, 0.0),
color(0.25, 1.0, 0.0),
color(0.0, 1.0, 0.0),
color(0.0, 1.0, 0.25),
color(0.0, 1.0, 0.5),
color(0.0, 1.0, 0.75),
color(0.0, 1.0, 1.0),
color(0.0, 0.75, 1.0),
color(0.0, 0.5, 1.0),
color(0.0, 0.25, 1.0),
color(0.0, 0.0, 1.0),
color(0.25, 0.0, 1.0),
color(0.5, 0.0, 1.0),
color(0.75, 0.0, 1.0),
color(1.0, 0.0, 1.0),
color(1.0, 0.0, 0.75),
color(1.0, 0.0, 0.5),
color(1.0, 0.0, 0.25),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment