Niwaki
Niwaki is refrakt's own syntax-only preset: it sets the syntax colors and nothing else, so chrome, fonts and the code canvas come from whatever sits beneath — which is why it composes with any other preset. It is named for the cloud-pruned trees of Japanese gardens, and its five colors are garden elements: wakaba (young leaf) for keywords, sakura (cherry) for functions, matsu (pine) for links and constants, momiji (maple) for strings, ishi (stone) for comments. It sets only the nine base syntax roles, so types paint like functions and tags like keywords. This documentation site uses it.
Opt in
{
"site": {
"theme": {
"package": "@refrakt-md/lumina",
"presets": ["@refrakt-md/lumina/presets/niwaki"]
}
}
}
Palette
Niwaki — light
Wakaba / Young leaf (keyword)#5e7d2aW: 4.7 · B: 4.4AA ✓AAA ✗
Sakura / Cherry (function)#b54a6bW: 5.1 · B: 4.2AA ✓AAA ✗
Matsu / Pine (link, constant)#3d6b3dW: 6.2 · B: 3.4AA ✓AAA ✗
Momiji / Maple (string)#a8521cW: 5.4 · B: 3.9AA ✓AAA ✗
Momiji punchy (string-expression)#c54a14W: 4.8 · B: 4.4AA ✓AAA ✗
Ishi / Stone (comment, punctuation)#8a857dW: 3.7 · B: 5.7AA ✗AAA ✗
Niwaki — dark
Wakaba (keyword)#b3d475W: 1.7 · B: 12.6AA ✗AAA ✗
Sakura (function)#f591a6W: 2.2 · B: 9.5AA ✗AAA ✗
Matsu (link, constant)#8ab589W: 2.3 · B: 9.1AA ✗AAA ✗
Momiji (string)#eba073W: 2.1 · B: 9.8AA ✗AAA ✗
Momiji punchy (string-expression)#fa9a61W: 2.1 · B: 9.9AA ✗AAA ✗
Ishi (comment, punctuation)#7d7062W: 4.8 · B: 4.4AA ✓AAA ✗
Preview
// A small user-service shape
interface User {
id: number;
name: string;
preferences: Record<string, unknown>;
}
async function findUser(id: number): Promise<User | null> {
const re = /^\d+$/;
if (!re.test(String(id))) return null;
const user = await db.users.findOne({ where: { id } });
return user ?? null;
}
const widget = <Button onClick={() => findUser(42)} variant="primary">Find</Button>;
Attribution
Original to refrakt; ships in @refrakt-md/lumina under the MIT license.