Add `colors.fromBlit` to the `colors` API
sorucoder opened this issue ยท 0 comments
So we currently have colors.toBlit
, which is useful for converting a color
value to be used with Redirect.blit
. However, extracting that same color from a window
with window.getLine
, is not feasible in the standard API. What I propose is the following:
colors.fromBlit(blitColors[, index=1])
Converts the given paint/blit hex character (0-9a-f) to a color.
Parameters
blitColors : string
The given paint/blit hex character(s).index? : number = 1
The index of the paint/blit hex character to convert.
Returns
number
The color value of the given paint/blit hex character.
Throws
- If the character given is not (0-9a-f).