Swotch Changelog
2026_0610
Allows changing canvas colour: checkered, black, white, grey
  (For viewing images with transparency)
Adds ability to set semi-transparent swatches in swatch list
  Exporting 'transparent and quantised' uses only these swatches
  Allows ltd. colour PNGs where a colour = a hex + opacity level
Adds options for output transparency:
  On: can preserve semi-transparent colours in output file
  Off: makes all colours in output file 100% opaque
  Binary: makes all pixels either 100% opaque or clear
    Adds threshold:
      Make pixels over X% opaque 100% opaque
      Make pixels under X% opaque 100% clear
Improves Matte options (applicable if No Transparency or Binary)
  Binary + Matte = matte semi-transparent on matte colour
  Binary + No Matte = make semi-transparent pixels opaque
    (e.g. black 20% opaque -> 100% opaque)
    (should snap to spatially nearest existing opaque colour)
Improve UI item grouping
Adds Trim checkbox
  Samples top left corner pixel colour
  Trims all sides until each has a pixel with a different colour
Adds Padding input - to pad all sides (after trim) by N pixels
Updates process order: trim > pad > adjust output size

2026_0531
Improves SVG colour extract to catch 'default black' in file
  where visible item has no fill and no class so shows as black
Fixes bug in fit to view button to ensure always fits to view
Shows info about current view zoom level after zoom buttons
Renders SVG as image and offers to quantise
  (vs extract colours only)
  [For now, prefer to use existing separate SVG to PNG tool]
  Auto renders SVGs over 2MP at 1MP output size onload
    to avoid compute user may not want 

2026_0529
Fixes interlaced PNG reader

2026_0527
Adds drag to save to each save button
Adds CMD+S Ctrl+S keyboard shortcut, to save quantised PNG

2026_0525
Refactors all

2026_0524
adds "mask to palette" mode
  makes an image where areas not matching a swatch stay clear
  (vs making an image snap all pixels to nearest palette colour)
offers to overlay the quantised image over the original
  in "mask to palette" mode unmatching colour areas show through
adds auto pick palette
  to work with anti-aliased JPG exports of solid fill vector art
  it merges many shades of 'same' colour to one colour
tweaks aliased mode 'solid fill art' to cut more JPG artifacts
  (e.g. red shape meet yellow, JPG puts orange between, remove)
adds checker-board behind image to see transparent areas clearly
adds status area for 'working' and 'updated' messages
adds 'matte' option to produce opaque PNG
  by placing semi-transparent pixels on a chosen colour or white
adds 'copy swatches to svg' (grid of swatch squares)
adds 'copy swatches to txt' (hex list)

2026_0514
sorts colours perceptually (closer to how a human would)
saves current palette as txt (hex list) or svg (swatch squares)
offers two palette extraction methods (quantity specifiable)
  one for photo (perceptual)
  one for vector art (most occurring colours)
    [^ REMOVED : only uses photo mode]
offers two options for reducing already quantised image further
  pick from existing colours: reduce 2 reds to most occurring 1
  make a new palette: reduce 2 reds to average of both reds
makes drag drop to load file window wide
adds a manual colour picker
tidies ui to one palette area:
allows editing any swatch:
  click a swatch to activate it and see its options:
    delete it
    change it by
      colour picking another pixel of the current image
      picking different colour from html picker
    copy its hex code
handles pasted swatches from svg or hexes found in clipboard
  offers to append to palette or replace palette
adds live mode to re-make quantised image as settings change

2026_0513 Version 2
extracts exact palette (hex list) from
  quantised image (image with limited palette colour table)
  SVG
  txt file
extract approximate palette from
  N most occurring colours in an image
quantizes image (unlimited or pre-quantised) to any palette:
  uses
    import palette from hex list / SVG and apply to image
    extract palette from image A, apply to image B
    extract main palette from image and reduce
preserves transparency
  100% transparent pixels stay transparent in output
offers to dither image using mixed methods

-----------------------
The log for a completely new tool starts above this line
The new tool combines 5 or so tools of mine into one
and supersedes the original tool.

The log for the original tool ends below the line below.
It made a limited colour PNG or SVG swatch palette from an image
-----------------------

# 2026_0101
Makes save button draggable

# 2025_0328
Links to demo gif with note of duration and file size

# 2025_0327
First publication public version 1

# 2025_0326
Adds title text to buttons to clarify what they do
Hides swatches until user has picked colours
Clears swatches when user swaps an image
Styles left canvas when user drags file over
Adds demo video

# 2025_0325_1447
Shows donut loupe around mouse position on hover image
Fills donut with current colour of pixel under cursor
Adds toggling between greyscale and colour versions of the image
Hides default file picker
Adds 'current file name' top bar.
Lets user click 'current file name' to swap active file
Styles buttons in toolbar (adds 'no select', cursor: pointer)
Styles app black and white
Hides 'delete current swatch' button when replace deactivates it
Adds info popover
Makes loupe float above everything when visible

# 2025_0311
adds drag drop reader
fixes bug that shrank images to half size

styles site minimally
highlights active swatch
swaps delete button per swatch for one 'delete swatch' button
shows 'delete swatch' button when a swatch is selected
uses javascript to fit the canvases to window
can save an svg of colour swatches extracted
saves the indexed image with the file name of the original