/ concept-collection / mesh-studio
Sign in
concept-collection / mesh-studio
mesh-studio / src / render / palette.ts
15 lines · 550 BCodeBlameHistory
3/**
4 * A distinct color per face id, spread around the hue circle by the golden
5 * ratio so neighbouring faces stay easy to tell apart at any face count.
6 */
7export function faceColor(id: number): THREE.Color {
8 const h = (id * 0.618033988749895) % 1
9 return new THREE.Color().setHSL(h, 0.55, 0.62)
12export const SELECTED_COLOR = new THREE.Color('#ffb020')
13export const NET_COLOR = new THREE.Color('#9b6bff')
14export const POLE_COLOR = new THREE.Color('#ffd166')
15export const ISO_COLOR = new THREE.Color('#3fc7ff')
moveopenescclose