SHARE
TWEET

Untitled

a guest Sep 16th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const options = {
  2.     [Rainbow.Red]: () => new RGBColor(0xFF, 0x00, 0x00),
  3.     [Rainbow.Orange]: () => new RGBColor(0xFF, 0x7F, 0x00),
  4.     [Rainbow.Yellow]: () => new RGBColor(0xFF, 0xFF, 0x00),
  5.     [Rainbow.Green]: () => new RGBColor(0x00, 0xFF, 0x00),
  6.     [Rainbow.Blue]: () => new RGBColor(0x00, 0x00, 0xFF),
  7.     [Rainbow.Indigo]: () => new RGBColor(0x4B, 0x00, 0x82),
  8.     [Rainbow.Violet]: () => new RGBColor(0x94, 0x00, 0xD3),
  9.     default: colorBand => throw Error(`invalid enum value ${colorBand}`),
  10. };
  11. (options[colorBand] || options.default)(colorBand)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top