Docs (4.0.0)
class UIColor method

brighten

Returns a new UIColor instance with increased (or decreased) brightness.

brighten(d: number): UIColor

Parameters

  • d — The change in brightness to apply, -1 meaning fully black, 1 meaning fully white, and 0 meaning no change

Return value

A new instance of UIColor.

Example

// Modifying a theme color
ui.cell(
  {
    background: ui.color.PRIMARY.brighten(0.5),
    textColor: ui.color.PRIMARY_BG.brighten(0.5).text()
  },
  // ...
)

Related