Lua color code generator11/21/2023 ![]() ![]() parse ( '#ffffff' ): alpha ( 0 ): string () = 'hsla(0, 0%, 0%, 0)' Color:rotate(mod) ( function) Post-processing operator for color hue rotation. parse ( '#ff0000' ): lum ( 0 ): string () = '#000000' Color:alpha(val) ( function) Alpha getter-setter for color compositing. ( number optional) Returns: Color instance. Parameter: val Luminosity value to set ( 0 - 100). parse ( '#ff0000' ): sat ( 0 ): string () = '#808080' Color:lum( val) ( function) Lightness color property getter-setter. Parameter: val Saturation value to set ( 0 - 100). parse ( '#ff0000' ): hue ( 180 ): string () = '#00ffff' Color:sat( val) ( function) Saturation color property getter-setter. Parameter: val Hue value to set ( 0 - 360). parse ( '#00ff00' ): blue ( 255 ): string () = '#00ffff' Color:hue( val) ( function) Hue color property getter-setter. Parameter: val Blue value to set ( 1 - 255). parse ( '#ffffff' ): green ( 1 ): string () = '#ff00ff' Color:blue( val) ( function) Blue color property getter-setter. Parameter: val Green value to set ( 1 - 255). parse ( '#000000' ): red ( 255 ): string () = '#ff0000' Color:green( val) ( function) Green color property getter-setter. Parameter: val Red value to set ( 1 - 255). Returns: Hexadecimal 6-digit or HSLA color string. ![]() ( Color) Color:string() ( function) Color string default output. ![]() 'no color data provided' ( string line 304) 'invalid color type "$1" specified' ( string line 309) Returns: Color instance. ( string) tup Color tuple in HSL or RGB ( table) alp Alpha value range ( 0 - 1). Color:new(typ, tup, alp) ( function) Color instance constructor. Color.alp (member number) Color alpha channel value. Color.typ (member string) Color space type. The class provides color prop getter-setters, procedures for color computation, compositing methods and serialisation into CSS color formats.Ĭolor.tup ( table) Color tuple. ( string) Usage: ColorĬolor item class, used for color processing. ( table) Error: 'invalid SASS parameter name supplied' ( string line 778) Returns: Color string aligning with parameter. Parameter: frame Frame invocation object. instance ( '#ffffff' ) colors.wikia(frame) ( function) Color SASS parameter access utility for templating. ( Color| string) Returns: Whether the color item was instantiated. parse ( '#ffffff' ) See also: Color:new colors.instance(item) ( function) Instance test function for colors. ( string) Error: 'cannot parse $str' ( string line 756) Returns: Color instance. fromHsl ( 0, 0, 1, 0.2 ) See also: Color:new colors.parse(str) ( function) Parsing logic for color strings. H Hue value ( 0 - 360) ( number) s Saturation value ( 0 - 1). fromRgb ( 255, 255, 255, 0.2 ) See also: Color:new omHsl(h, s, l, a) ( function) Creation of HSL color instances. fromHsl ( 214, 0.15, 0.8 ): string ()) - expected output '#414b58' Documentation Package items omRgb(r, g, b, a) ( function) Creation of RGB color instances. If Color.Local colors = require ( "Dev:Colors" ) mw. Local new_col = Color.band(color, 0xff00ff) - get new color without the green channel Color:isColor (color) inside Neovim), which don't provide native support for bitwise operators.Ĭolor or mask (if a and b are colors b is used as mask) Rgb, rgba, hsv, hsva, hsl, hsla, hwb, hwba, ncol, cmykĪpply rgb mask to color, providing backwards compatibility for Lua 5.1 and LuaJIT 2.1.0-beta3 (e.g. If format is nil, color:tostring() is the same as tostring(color). Table with n colors including self at index 1 Space colors over r rotations (Default: 1) Part of full turn or table containing degree or radiansĠ results in self, 1 results in other (Default: 0.5) ![]() Set to black or white depending on lightness.Īpply rgb mask to color, providing backwards compatibility for Lua 5.1 and LuaJIT 2.1.0-beta3 (e.g.Ĭan be set to a table containing named colors to be used by Color:setĬlorNames = Parse, convert and manipulate color values.Ĭhecks whether color is as dark or darker. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |