Skip to content

Color Funtions

googer_ edited this page Nov 13, 2024 · 1 revision

About Ext_Color

This extension adds a bunch of color functions.

Capability ext_color

Info

  • ID: alt text ext_color
  • Accessed with: thorium.color

Functions

alt text color.FromHex(hexstring: string) -> Color
Create color from a hex string

alt text Color.ToLuminance(self: Color) -> number
Converts color to a luminance - how "bright" color is.

alt text Color.ToHex(self: Color) -> string
Converts color into a hex string

alt text Color.ToGrayscale(self: Color) -> Color
Converts color into a hex string

alt text Color.Invert(self: Colorm invert_alpha: boolean) -> Color
Converts color into a hex string

alt text Color.SetBrightness(self: Color, bright: number) -> Color
Sets color brightess

Other fields

alt text color.SERVER: Color = Color(156, 241, 255, 200)
alt text color.CLIENT: Color = Color(255, 241, 122, 200)
alt text color.MENU: Color = Color(100, 220, 100, 200)
alt text color.SERVER_ERR = Color(136, 221, 255, 200)
alt text color.CLIENT_ERR = Color(255, 221, 102, 200)
alt text color.MENU_ERR = Color(120, 220, 100, 200)
alt text color.REALM = Varies, based on current realm

Clone this wiki locally