lettermark

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

lettermark

Go Reference

The mark a thing gets when it has no picture of its own: the letters that go in the square, and which of the palette's colour slots it is drawn on.

letters := lettermark.Initials(name)
slot := lettermark.Slot(id) // 0 … lettermark.Slots-1

The palette is not here. A caller keeps its own — CSS custom properties, a colour catalogue, a theme — with lettermark.Slots colours in it, and looks up the slot this library returns. That keeps one thing in one place: the rule here, the colours where the rest of the design lives.

Initials is given the name a reader sees. A caller holding markup strips it first; this library does not know what markup its caller writes.

cases.yaml is the contract. Every port carries a copy of it and a test that compares that copy with this repository byte for byte, so a case added here is answered by all of them or fails loudly.

Ports

Documentation

Index

Examples

Constants

View Source
const Slots = 12

Variables

This section is empty.

Functions

func Initials

func Initials(name string) string
Example
package main

import (
	"fmt"

	"github.com/botforge-pro/lettermark"
)

func main() {
	fmt.Println(lettermark.Initials("Wiki Layer"))
}
Output:
WL

func Slot

func Slot(id int64) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL