struct
Tessell::Render::Theme
- Tessell::Render::Theme
- Struct
- Value
- Object
Defined in:
tessell/render/theme.crConstructors
- .dark : Theme
- .light : Theme
-
.new(bg : UInt32, fg : UInt32, accent : UInt32, muted : UInt32, border : UInt32, selection : UInt32, panel : UInt32, panel_alt : UInt32, card : UInt32, grid : UInt32, divider : UInt32, up : UInt32, down : UInt32, up_soft : UInt32, down_soft : UInt32, hover : UInt32, focus_ring : UInt32, warning : UInt32, danger : UInt32, success : UInt32, faint : UInt32)
全参构造:显式给出所有 token。
-
.new(bg : UInt32, fg : UInt32, accent : UInt32, muted : UInt32, border : UInt32, selection : UInt32)
兼容构造(M3-WP5 口径):只给基础六元,扩展 token 按规则推导。
Class Method Summary
- .a(c : UInt32) : Float32
- .ab(c : UInt32) : UInt8
- .b(c : UInt32) : Float32
- .bb(c : UInt32) : UInt8
- .g(c : UInt32) : Float32
- .gb(c : UInt32) : UInt8
-
.mix(a : UInt32, b : UInt32, t : Float32) : UInt32
线性插值(rgb 插值,alpha 取 a 的 alpha)。
-
.r(c : UInt32) : Float32
归一化通道(0..1,任务要求的静态取通道方法)。
-
.rb(c : UInt32) : UInt8
通道拆解(0xRRGGBBAA → 0..255)。
-
.with_alpha(c : UInt32, alpha : UInt8) : UInt32
替换 alpha 通道。
Instance Method Summary
- #accent : UInt32
- #bg : UInt32
- #border : UInt32
- #card : UInt32
- #danger : UInt32
- #divider : UInt32
- #down : UInt32
- #down_soft : UInt32
- #faint : UInt32
- #fg : UInt32
- #focus_ring : UInt32
- #grid : UInt32
- #hover : UInt32
- #muted : UInt32
- #panel : UInt32
- #panel_alt : UInt32
- #selection : UInt32
- #success : UInt32
- #up : UInt32
- #up_soft : UInt32
- #warning : UInt32
Constructor Detail
def self.new(bg : UInt32, fg : UInt32, accent : UInt32, muted : UInt32, border : UInt32, selection : UInt32, panel : UInt32, panel_alt : UInt32, card : UInt32, grid : UInt32, divider : UInt32, up : UInt32, down : UInt32, up_soft : UInt32, down_soft : UInt32, hover : UInt32, focus_ring : UInt32, warning : UInt32, danger : UInt32, success : UInt32, faint : UInt32)
#
全参构造:显式给出所有 token。
def self.new(bg : UInt32, fg : UInt32, accent : UInt32, muted : UInt32, border : UInt32, selection : UInt32)
#
兼容构造(M3-WP5 口径):只给基础六元,扩展 token 按规则推导。