Skip to content

bug: Color Sampling is broken #94

@PartMan7

Description

@PartMan7

Currently, it just returns the original colours in order.

const players = ['audiino', 'partman', 'azref', '1hfkqhwhrelk'].map(id => {const [H,S,L]=(require('ps-client/tools').HSL(id).hsl);return({ id, color: require('@/utils/color').HslToHex({H,S,L,colorspace: 'hsla'}) })});
/**
[
  { id: 'audiino', color: '#7a6ddf' },
  { id: 'partman', color: '#eb5c0f' },
  { id: 'azref', color: '#217ec4' },
  { id: '1hfkqhwhrelk', color: '#24946d' }
]
*/

colorSampler(E.players,['#ff0000', '#ff8000', '#ffff00', '#00ff00', '#00ffff', '#0000ff', '#9e00ff', '#ff00ff']);
/**
[
  { id: 'audiino', color: '#7a6ddf', assigned: '#ff0000' },
  { id: 'partman', color: '#eb5c0f', assigned: '#ff8000' },
  { id: 'azref', color: '#217ec4', assigned: '#ffff00' },
  { id: '1hfkqhwhrelk', color: '#24946d', assigned: '#00ff00' }
]
*/

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions