Ensure colors in line graph palettes have unique IDs

pull/10616/head
Alex P 2018-04-03 21:14:34 -07:00
parent 053aa3d2d8
commit d7914c9013
1 changed files with 23 additions and 22 deletions

View File

@ -1,4 +1,5 @@
import chroma from 'chroma-js'
import uuid from 'uuid'
const COLOR_TYPE_SCALE = 'scale'
@ -7,21 +8,21 @@ export const LINE_COLORS_A = [
{
type: COLOR_TYPE_SCALE,
hex: '#31C0F6',
id: '0',
id: uuid.v4(),
name: 'Nineteen Eighty Four',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#A500A5',
id: '0',
id: uuid.v4(),
name: 'Nineteen Eighty Four',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#FF7E27',
id: '0',
id: uuid.v4(),
name: 'Nineteen Eighty Four',
value: '0',
},
@ -31,21 +32,21 @@ export const LINE_COLORS_B = [
{
type: COLOR_TYPE_SCALE,
hex: '#74D495',
id: '1',
id: uuid.v4(),
name: 'Atlantis',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#3F3FBA',
id: '1',
id: uuid.v4(),
name: 'Atlantis',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#FF4D9E',
id: '1',
id: uuid.v4(),
name: 'Atlantis',
value: '0',
},
@ -55,21 +56,21 @@ export const LINE_COLORS_C = [
{
type: COLOR_TYPE_SCALE,
hex: '#8F8AF4',
id: '1',
id: uuid.v4(),
name: 'Do Androids Dream of Electric Sheep?',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#A51414',
id: '1',
id: uuid.v4(),
name: 'Do Androids Dream of Electric Sheep?',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#F4CF31',
id: '1',
id: uuid.v4(),
name: 'Do Androids Dream of Electric Sheep?',
value: '0',
},
@ -79,21 +80,21 @@ export const LINE_COLORS_D = [
{
type: COLOR_TYPE_SCALE,
hex: '#FD7A5D',
id: '1',
id: uuid.v4(),
name: 'Delorean',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#5F1CF2',
id: '1',
id: uuid.v4(),
name: 'Delorean',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#4CE09A',
id: '1',
id: uuid.v4(),
name: 'Delorean',
value: '0',
},
@ -103,21 +104,21 @@ export const LINE_COLORS_E = [
{
type: COLOR_TYPE_SCALE,
hex: '#FDC44F',
id: '1',
id: uuid.v4(),
name: 'Cthulhu',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#007C76',
id: '1',
id: uuid.v4(),
name: 'Cthulhu',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#8983FF',
id: '1',
id: uuid.v4(),
name: 'Cthulhu',
value: '0',
},
@ -127,21 +128,21 @@ export const LINE_COLORS_F = [
{
type: COLOR_TYPE_SCALE,
hex: '#DA6FF1',
id: '1',
id: uuid.v4(),
name: 'Ectoplasm',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#00717A',
id: '1',
id: uuid.v4(),
name: 'Ectoplasm',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#ACFF76',
id: '1',
id: uuid.v4(),
name: 'Ectoplasm',
value: '0',
},
@ -151,21 +152,21 @@ export const LINE_COLORS_G = [
{
type: COLOR_TYPE_SCALE,
hex: '#F6F6F8',
id: '1',
id: uuid.v4(),
name: 'T-Max 400 Film',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#A4A8B6',
id: '1',
id: uuid.v4(),
name: 'T-Max 400 Film',
value: '0',
},
{
type: COLOR_TYPE_SCALE,
hex: '#545667',
id: '1',
id: uuid.v4(),
name: 'T-Max 400 Film',
value: '0',
},
@ -175,7 +176,7 @@ export const LINE_COLORS_RULE_GRAPH = [
{
type: COLOR_TYPE_SCALE,
hex: '#4ED8A0',
id: '1',
id: uuid.v4(),
name: 'Rainforest',
value: '0',
},