8000 mini.nvim/doc/mini-colors.txt at main · Woynert/mini.nvim · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
834 lines (663 loc) · 35.9 KB

mini-colors.txt

File metadata and controls

834 lines (663 loc) · 35.9 KB
- <transition_duration> `(number)` - number of milliseconds to spend
showing transition. Default: 1000.
- <show_duration> `(number)` - number of milliseconds to show intermediate
color schemes (all but last in `cs_array`). Default: 1000.
------------------------------------------------------------------------------
*MiniColors.convert()*
`MiniColors.convert`({x}, {to_space}, {opts})
Convert between color spaces
For a list of supported colors spaces see |MiniColors-color-spaces|.
Parameters ~
{x} `(table|string|number|nil)` Color to convert from. Its color space is
inferred automatically.
{to_space} `(string)` Id of allowed color space.
{opts} `(table|nil)` Options. Possible fields:
- <gamut_clip> `(string)` - method for |MiniColors-gamut-clip|.
Default: `'chroma'`.
Return ~
`(table|string|number|nil)` Color in space `to_space` or `nil` if input is `nil`.
------------------------------------------------------------------------------
*MiniColors.modify_channel()*
`MiniColors.modify_channel`({x}, {channel}, {f}, {opts})
Modify channel
Parameters ~
{x} `(table|string|number|nil)` Color which channel will be modified. Color
space is inferred automatically.
{channel} `(string)` One of supported |MiniColors-channels|.
{f} `(function)` Callable which defines modification. Should take current
value of a channel and return a new one.
{opts} `(table|nil)` Options. Possible fields:
- <gamut_clip> `(string)` - method for |MiniColors-gamut-clip|.
Default: `'chroma'`.
Return ~
`(string|nil)` Hex string of color with modified channel or `nil` if input is `nil`.
------------------------------------------------------------------------------
*MiniColors.simulate_cvd()*
`MiniColors.simulate_cvd`({x}, {cvd_type}, {severity})
Simulate color vision deficiency
Parameters ~
{x} `(table|string|number|nil)` Color to convert from. Its color space is
inferred automatically.
{cvd_type} `(string)` Type of CVD. One of `'protan'`, `'deutan'`,
or `'mono'` (equivalent to converting to graysacle).
{severity} `(number|nil)` Severity of CVD. A number between 0 and 1 (default).
Return ~
`(string|nil)` Hex string of simulated color or `nil` if input is `nil`.
vim:tw=78:ts=8:noet:ft=help:norl:
0