Log inGet started
Package

ukiyoeBlocks.package

This package holds more than this page lists. See all of its files in its world.

README.md

InkCheck (module)

Measures how much of a presented frame is printed in the woodblock look's own colours.

-- 1. capture { source = "presented", format = "png", save_path = "/source/tmp/shot.png" }
local InkCheck = require("~ukiyoeBlocks.InkCheck")
print(InkCheck.measure("/source/tmp/shot.png", { exclude = { 0.75, 0, 1, 0.17 } }).share) -- percent of pixels near an ink
  • InkCheck.references(): the colours the current stack may print: the palette's inks, its shadow and air colours, the sky and water bands, cloud, foam and paper colours.
  • InkCheck.measure(path, { tolerance?, step?, exclude? }): { share, samples, tolerance, references, worst }. share is the percent of sampled pixels within tolerance (Oklab distance, default 0.06) of a reference colour; worst lists the most common colours that are not, so you can see what escaped the palette. exclude leaves out a rectangle (0..1 of the frame), such as a HUD panel.