CC: Tweaked

CC: Tweaked

57M Downloads

Add `colors.fromBlit` to the `colors` API

sorucoder opened this issue ยท 0 comments

commented

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

  1. blitColors : string The given paint/blit hex character(s).
  2. index? : number = 1 The index of the paint/blit hex character to convert.

Returns

  1. number The color value of the given paint/blit hex character.

Throws

  • If the character given is not (0-9a-f).