Skip to content

lcd.GREY

since 1.1.0

Get a grey color from a dark value (0 = darker) with optional alpha opacity.

local color = lcd.GREY(value[, alpha])

Parameters

Name Type Required Description
value integer yes dark value(0 - 255)
alpha number optional alpha value(0 - 1.0)

Returns

color (integer)

Examples

local TRACK  = lcd.GREY(60)          -- dark grey (0 = black)
local SUBTLE = lcd.GREY(160, 0.5)    -- light grey, 50 % transparent

Used in

Real-world usage

Called 32 times across 4 open-source Ethos Lua projects. A few short excerpts:
lcd.color(lcd.GREY(0xFF))

lua/frsky/JetWidget/main.lua:115

lcd.color(isDark and lcd.GREY(80) or lcd.GREY(180))

src/rfsuite/app/modules/governor/tools/curves.lua:443

if lcd.color and lcd.GREY then lcd.color(lcd.GREY(90)) end

src/rfsuite/app/pages/setup_governor_curves.lua:82