Skip to content

Commit

Permalink
BB: Add color constants for the full eInk palette (#1548)
Browse files Browse the repository at this point in the history
And rename a couple of confusing/dumb ones.
  • Loading branch information
NiLuJe committed Oct 30, 2022
1 parent eb9b1b0 commit 0fd29ac
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ffi/blitbuffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2175,14 +2175,22 @@ function BB.gray(level)
return Color8(bxor(floor(0xFF * level), 0xFF))
end

-- some generic color values:
-- the full eInk palette:
BB.COLOR_WHITE = Color8(0xFF)
BB.COLOR_GRAY_E = Color8(0xEE)
BB.COLOR_GRAY_D = Color8(0xDD)
BB.COLOR_LIGHT_GRAY = Color8(0xCC)
BB.COLOR_GRAY_B = Color8(0xBB)
BB.COLOR_GRAY = Color8(0xAA)
BB.COLOR_WEB_GRAY = Color8(0x99)
BB.COLOR_GRAY_9 = Color8(0x99) -- was COLOR_WEB_GRAY
BB.COLOR_DARK_GRAY = Color8(0x88)
BB.COLOR_DIM_GRAY = Color8(0x55)
BB.COLOR_GRAY_7 = Color8(0x77)
BB.COLOR_GRAY_6 = Color8(0x66)
BB.COLOR_GRAY_5 = Color8(0x55) -- was COLOR_DIM_GRAY
BB.COLOR_GRAY_4 = Color8(0x44)
BB.COLOR_GRAY_3 = Color8(0x33)
BB.COLOR_GRAY_2 = Color8(0x22)
BB.COLOR_GRAY_1 = Color8(0x11)
BB.COLOR_BLACK = Color8(0)

-- accessors for color types:
Expand Down

0 comments on commit 0fd29ac

Please sign in to comment.