Improved colours so that the smaller polytopes still get high-contrast
nodes and inscriptionsfeature-3d-shapes
parent
229218ec40
commit
63b2f8f22e
13
colours.js
13
colours.js
|
@ -4,9 +4,20 @@ export const get_colours = (basis) => {
|
|||
const scheme = new ColorScheme;
|
||||
const hexbasis = basis.toString(16).padStart(6, "0");
|
||||
scheme.from_hex(hexbasis).scheme("tetrade").variation("hard").distance(0.5);
|
||||
return scheme.colors().map((cs) => parseInt('0x' + cs));
|
||||
const colours = scheme.colors().map((cs) => parseInt('0x' + cs));
|
||||
const set = colours.slice(1, 6);
|
||||
set.reverse();
|
||||
set.unshift(colours[0]);
|
||||
return set;
|
||||
}
|
||||
|
||||
// basic colours where 0 = blue
|
||||
// 1 - dark blue
|
||||
// 2 - white
|
||||
// 3 - light cyan
|
||||
// 4 - light orange
|
||||
// 5 - dark orange
|
||||
|
||||
export const get_plain_colours = (basis) => {
|
||||
return [
|
||||
basis,
|
||||
|
|
|
@ -439,7 +439,7 @@ const cell120_some_inscribed = (ps) => {
|
|||
}
|
||||
}
|
||||
|
||||
export const cell120_inscribed = () => cell120_some_inscribed([5]);
|
||||
export const cell120_inscribed = () => cell120_some_inscribed([1]);
|
||||
export const cell120_all_inscribed = () => cell120_some_inscribed([1,2,3,4,5]);
|
||||
|
||||
|
||||
|
@ -665,6 +665,6 @@ const cell600_some_inscribed = (ps) => {
|
|||
}
|
||||
|
||||
|
||||
export const cell600_inscribed = () => cell600_some_inscribed([5]);
|
||||
export const cell600_inscribed = () => cell600_some_inscribed([1]);
|
||||
export const cell600_all_inscribed = () => cell600_some_inscribed([1,2,3,4,5]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue