Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/icon-hq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ export function withStyle(manifest: Manifest, style: StyleSpec, entries: Map<str
dir: style.dir,
label: style.label,
material: style.material,
ground: style.ground,
sizes,
webp_sizes: [...HQ_WEBP_SIZES],
made_by: 'both',
Expand Down
8 changes: 8 additions & 0 deletions src/icon-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ export interface StyleSpec {
dir: string;
/** One line, for the manifest, the README and the set's index page. */
material: string;
/**
* The ground this style needs. `dark` is a refusal a reader should honour:
* emissive marks that emit neutral white are invisible on a white tile, so
* a surface that cannot give them a dark ground should pick another style.
*/
ground: 'light' | 'dark' | 'any';
/** OpenEmoji masters used as style references; the agentic styles use none. */
emojiRefs: readonly string[];
/** The style paragraph, without the icon. */
Expand Down Expand Up @@ -211,6 +217,7 @@ function agenticStyle(variant: keyof typeof AGENTIC_MATERIALS): StyleSpec {
label,
dir: `styles/${id}`,
material,
ground: variant === 'emissive' ? 'dark' : 'any',
emojiRefs: [],
styleText: `${AGENTIC_FRAME}\n${paragraph}`,
promptFor(icon) {
Expand All @@ -230,6 +237,7 @@ export const HQ: StyleSpec = {
label: 'HQ',
dir: 'hq',
material: 'Glass and enamel bodies under a warm key light, drawn beside the OpenEmoji masters.',
ground: 'any',
emojiRefs: STYLE_REFS,
styleText: HQ_STYLE,
promptFor(icon) {
Expand Down
7 changes: 7 additions & 0 deletions src/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ export interface StyleInfo {
label?: string;
/** One line on the material, so a reader can choose without looking. */
material?: string;
/**
* The ground this style is drawn to sit on. `dark` means it is only legible
* against one — a near-black body with a lit accent vanishes on white, and
* the marks that emit neutral white vanish completely. Only the set knows
* this, so a reader that places icons has to be told rather than guess.
*/
ground?: 'light' | 'dark' | 'any';
sizes: number[];
webp_sizes: number[];
made_by: 'ai' | 'human' | 'both';
Expand Down
Loading