hairstylecheck

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 2 Imported by: 0

README

Hairstyle Reference Check

hairstylecheck is a small Go library for evaluating how stable a virtual hairstyle reference remains across controlled comparison frames.

It validates four observations:

  • silhouette;
  • fringe or part;
  • perceived volume;
  • color impression.

The package returns a score from 0 to 8, a review band, and focused consultation prompts. It does not predict real haircut or color outcomes.

Example

assessment := hairstylecheck.Assessment{Observations: []hairstylecheck.Observation{
    {Factor: hairstylecheck.FactorSilhouette, Difference: hairstylecheck.Stable},
    {Factor: hairstylecheck.FactorFringe, Difference: hairstylecheck.Moderate},
    {Factor: hairstylecheck.FactorVolume, Difference: hairstylecheck.Large},
    {Factor: hairstylecheck.FactorColor, Difference: hairstylecheck.Stable},
}}

score, err := assessment.Score()
band, err := assessment.Band()

See the package documentation for the ownership disclosure and planning-app reference.

Documentation

Overview

Package hairstylecheck evaluates controlled virtual-hairstyle reference comparisons for planning discussions.

The package deliberately scores the stability of a reference rather than predicting a haircut result. Callers record how much the perceived silhouette, fringe or part, volume, and color change across controlled comparison frames. Assessment.Score returns a translation-risk total and Assessment.Band converts that total into a plain-language review band.

The companion Android planning app is available from https://play.google.com/store/apps/details?id=app.hair.style

Disclosure: this open-source package is published by the owner of Hairstyle App: Hair Try On. It is not affiliated with or endorsed by Google, Google Play, salons, stylists, hair-care brands, or certification bodies. Virtual previews and this package are planning aids; real outcomes vary with hair properties, technique, styling, products, environment, and camera processing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsultationPrompt

func ConsultationPrompt(factor Factor) (string, error)

ConsultationPrompt returns a focused question for the selected factor.

Types

type Assessment

type Assessment struct {
	Observations []Observation
}

Assessment contains the four required observations for a controlled hairstyle-reference review.

func (Assessment) Band

func (a Assessment) Band() (string, error)

Band returns a plain-language interpretation of a validated score.

func (Assessment) Score

func (a Assessment) Score() (int, error)

Score validates the assessment and returns a total from 0 to 8. A factor must appear exactly once, and each difference must be Stable, Moderate, or Large.

type Difference

type Difference uint8

Difference describes how much one visual feature changes across controlled reference frames.

const (
	// Stable means the feature remains materially consistent.
	Stable Difference = iota
	// Moderate means the feature changes but the intended shape remains readable.
	Moderate
	// Large means the feature changes substantially or cannot be evaluated.
	Large
)

type Factor

type Factor string

Factor identifies one part of a virtual-hairstyle comparison.

const (
	FactorSilhouette Factor = "silhouette"
	FactorFringe     Factor = "fringe-or-part"
	FactorVolume     Factor = "volume"
	FactorColor      Factor = "color-impression"
)

type Observation

type Observation struct {
	Factor     Factor
	Difference Difference
	Note       string
}

Observation records the difference score and an optional evidence note for one comparison factor.

Jump to

Keyboard shortcuts

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