diff --git a/docs/assets/protocolith/README_ASSETS.txt b/docs/assets/protocolith/README_ASSETS.txt index a8f679ca0..1d9121d21 100644 --- a/docs/assets/protocolith/README_ASSETS.txt +++ b/docs/assets/protocolith/README_ASSETS.txt @@ -7,21 +7,22 @@ FILES (bytes) concept_c.svg 7011 contact_sheet.svg 109897 demo.gif 415254 - favicon.svg 422 - logo-dark.svg 2311 - logo-mark-512.png 4421 - logo-mark.svg 1359 - logo.svg 2312 - social-preview.png 21448 - social-preview.svg 23661 + favicon.svg 1805 + logo-dark.svg 6446 + logo-mark-512.png 49461 + logo-mark-dark.svg 5511 + logo-mark.svg 5511 + logo.svg 6446 + social-preview.png 53522 + social-preview.svg 27839 workflow.gif 92014 -All SVGs are pure vector with outlined text (no external fonts, no raster) and carry and <desc>. -Wordmark "Protocolith": own monoline geometric letterforms (stroked paths, no font involved). -Tagline and contact-sheet labels: outlined from Source Sans Pro (SIL OFL 1.1, embedding outlines permitted). -Palette (chosen concept B): stone blue #1F3A5F (light) / #3E6BA8 (dark), facet #3B5E8F / #5B8AC9, -hash ticks amber #E8B04A / #F0B545, ink #17202B, light text #EEF2F6, dark ground #0E141B. -Text contrast (WCAG): ink on white 16.4:1, light text on dark 16.5:1, tagline #B4BFCB on dark 9.9:1. +CURRENT LOGO (concept E, chosen 2026-11-18): an isometric monolith with an amber P carved in its left face, standing on four +strata slabs, one slab per ledger layer; the slab edges carry hash-like ticks (heights from the first hex digits of +SHA-256("protocolith")), the amber rule along the top edge marks the ledger head. Generated by scripts/build_logo.py +(plain SVG, no fonts for the mark; the wordmark paths come from the earlier lockup). favicon.svg is a simplified version +(two slabs, no ticks). logo-mark-512.png is rendered from logo-mark.svg. Earlier concepts A, B and C are kept below. + CONCEPTS A Monolith: faceted slab, carved dashed lines read as protocol steps, last step amber. diff --git a/docs/assets/protocolith/favicon.svg b/docs/assets/protocolith/favicon.svg index bab3d8884..b32b5ee0d 100644 --- a/docs/assets/protocolith/favicon.svg +++ b/docs/assets/protocolith/favicon.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" role="img" aria-labelledby="t d"><title id="t">Protocolith faviconSimplified Protocolith mark for small sizes. +Protocolith faviconAn isometric monolith with an amber P carved in its face, standing on four strata slabs whose edges carry hash-like ticks, one slab per ledger layer. diff --git a/docs/assets/protocolith/logo-dark.svg b/docs/assets/protocolith/logo-dark.svg index fc7027aee..c43089288 100644 --- a/docs/assets/protocolith/logo-dark.svg +++ b/docs/assets/protocolith/logo-dark.svg @@ -1 +1 @@ -Protocolith logoA block of stone with a P cut through it and a row of hash-like ticks derived from the SHA-256 of the name. Horizontal lockup with the Protocolith wordmark, for dark backgrounds. +Protocolith logoAn isometric monolith with an amber P carved in its face, standing on four strata slabs whose edges carry hash-like ticks. diff --git a/docs/assets/protocolith/logo-mark-512.png b/docs/assets/protocolith/logo-mark-512.png index 8a3ca1ac4..418ce48dd 100644 Binary files a/docs/assets/protocolith/logo-mark-512.png and b/docs/assets/protocolith/logo-mark-512.png differ diff --git a/docs/assets/protocolith/logo-mark-dark.svg b/docs/assets/protocolith/logo-mark-dark.svg new file mode 100644 index 000000000..ccb7a8de6 --- /dev/null +++ b/docs/assets/protocolith/logo-mark-dark.svg @@ -0,0 +1 @@ +Protocolith markAn isometric monolith with an amber P carved in its face, standing on four strata slabs whose edges carry hash-like ticks, one slab per ledger layer. diff --git a/docs/assets/protocolith/logo-mark.svg b/docs/assets/protocolith/logo-mark.svg index f81a03c8c..b73829757 100644 --- a/docs/assets/protocolith/logo-mark.svg +++ b/docs/assets/protocolith/logo-mark.svg @@ -1 +1 @@ -Protocolith markA block of stone with a P cut through it and a row of hash-like ticks derived from the SHA-256 of the name. +Protocolith markAn isometric monolith with an amber P carved in its face, standing on four strata slabs whose edges carry hash-like ticks, one slab per ledger layer. diff --git a/docs/assets/protocolith/logo.svg b/docs/assets/protocolith/logo.svg index a63ee05f6..96a274919 100644 --- a/docs/assets/protocolith/logo.svg +++ b/docs/assets/protocolith/logo.svg @@ -1 +1 @@ -Protocolith logoA block of stone with a P cut through it and a row of hash-like ticks derived from the SHA-256 of the name. Horizontal lockup with the Protocolith wordmark, for light backgrounds. +Protocolith logoAn isometric monolith with an amber P carved in its face, standing on four strata slabs whose edges carry hash-like ticks. diff --git a/docs/assets/protocolith/social-preview.png b/docs/assets/protocolith/social-preview.png index b15af5ce3..3f3dc8a8c 100644 Binary files a/docs/assets/protocolith/social-preview.png and b/docs/assets/protocolith/social-preview.png differ diff --git a/docs/assets/protocolith/social-preview.svg b/docs/assets/protocolith/social-preview.svg index 5c955d8a8..a272a1d92 100644 --- a/docs/assets/protocolith/social-preview.svg +++ b/docs/assets/protocolith/social-preview.svg @@ -1 +1 @@ -ProtocolithProtocolith. Records, verifies and issues trial records. +ProtocolithProtocolith. Records, verifies and issues trial records. diff --git a/scripts/build_logo.py b/scripts/build_logo.py new file mode 100644 index 000000000..6f4987f13 --- /dev/null +++ b/scripts/build_logo.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +"""Generate the Protocolith logo assets (isometric monolith on strata slabs) as plain SVG. + +Writes into docs/assets/protocolith/: logo-mark.svg, logo-mark-dark.svg, favicon.svg (simplified: two slabs, no ticks), +logo.svg and logo-dark.svg (horizontal lockups; the wordmark paths are kept from the existing files) and replaces the mark +inside social-preview.svg. The tick heights come from the SHA-256 of "protocolith". Standard library only. +PNG files are rendered from the SVGs with any SVG rasterizer (for example `qlmanage -t -s 512` on macOS). +""" +import math,hashlib,sys +K=math.sqrt(3)/2 +def P(x,y,z): return ((x-y)*K, (x+y)*0.5 - z) +def poly(pts,fill,extra=""): + return ''%(" ".join("%.2f,%.2f"%p for p in pts),fill,extra) +def block(x0,y0,z0,w,d,h,top,left,right,stroke): + A=lambda x,y,z:P(x0+x,y0+y,z0+z) + out=[] + out.append(poly([A(w,0,0),A(w,d,0),A(w,d,h),A(w,0,h)],right,f' stroke="{stroke}" stroke-width="0.6"')) + out.append(poly([A(0,d,0),A(w,d,0),A(w,d,h),A(0,d,h)],left,f' stroke="{stroke}" stroke-width="0.6"')) + out.append(poly([A(0,0,h),A(w,0,h),A(w,d,h),A(0,d,h)],top,f' stroke="{stroke}" stroke-width="0.6"')) + return "".join(out) +def build(dark=False, simple=False): + if dark: ink="#0E141B"; pal=[("#7FA6DE","#4F7DB8","#2B4C7A"),("#6C97D1","#436FA8","#25446E"),("#5F8CC6","#3B6399","#203D63"),("#527FB8","#335A8C","#1B3556")]; cap=("#A9C5EE","#5B8AC9","#2F5486"); amber="#F0B545"; tick="#C8D9F2" + else: ink="#0E141B"; pal=[("#6C97D1","#436FA8","#25446E"),("#5F8CC6","#3B6399","#203D63"),("#527FB8","#335A8C","#1B3556"),("#4673A9","#2D5282","#17304F")]; cap=("#8FB3E6","#3E6BA8","#1F3A5F"); amber="#E8B04A"; tick="#B4CBEA" + digits=hashlib.sha256(b"protocolith").hexdigest() + parts=[]; S=104; H=9 if not simple else 16; z=0 + # strata, bottom first, slight horizontal stagger from the hash digits + for k,(t,l,r) in enumerate(pal[:2] if simple else pal): + off=(int(digits[k],16)-7.5)*0.55 + parts.append(block(off,0,z,S,S,H,t,l,r,ink if False else "#0B1624")) + # hash ticks on the right face of this slab + for j in range(0 if simple else 6): + hh=2+int(digits[k*6+j+4],16)/15*4.2 + y=12+j*14 + x=S+off + p1=P(x,y,z+1.2); p2=P(x,y,z+1.2+hh) + parts.append(''%(p1[0],p1[1],p2[0],p2[1],tick)) + z+=H + # monolith cap + w=46; d=46; h=88; ox=29; oy=29 + parts.append(block(ox,oy,z,w,d,h,cap[0],cap[1],cap[2],"#0B1624")) + # amber head line along the top front edges of the monolith + a=P(ox,oy+d,z+h); b=P(ox+w,oy+d,z+h); c=P(ox+w,oy,z+h) + parts.append(''%(a[0],a[1],b[0],b[1],c[0],c[1],amber)) + # carved amber P on the left face + o=P(ox,oy+d,z) # face origin (u=0,v=0) + tr=f'matrix({K:.4f} 0.5 0 -1 {o[0]:.3f} {o[1]:.3f})' + g=('M10,20H21V36H29C37,36 41,42 41,50C41,58 37,64 29,64H10ZM21,44H28C31,44 32,46 32,50C32,54 31,56 28,56H21Z') + parts.append(f'') + body="".join(parts) + xs=[float(x) for x in __import__("re").findall(r'(-?\d+\.\d+),(-?\d+\.\d+)',body) for x in [x[0]]] + return body +def svg(dark=False, simple=False): + body=build(dark, simple) + import re + pts=[(float(a),float(b)) for a,b in re.findall(r'(-?\d+\.\d+),(-?\d+\.\d+)',body)] + for m in re.finditer(r'x1="(-?\d+\.\d+)" y1="(-?\d+\.\d+)" x2="(-?\d+\.\d+)" y2="(-?\d+\.\d+)"',body): + pts+= [(float(m[1]),float(m[2])),(float(m[3]),float(m[4]))] + minx=min(p[0] for p in pts); maxx=max(p[0] for p in pts); miny=min(p[1] for p in pts); maxy=max(p[1] for p in pts) + sc=232/max(maxx-minx,maxy-miny); tx=128-(minx+maxx)/2*sc; ty=128-(miny+maxy)/2*sc + return (f'Protocolith mark' + 'An isometric monolith with an amber P carved in its face, standing on four strata slabs whose edges carry hash-like ticks, one slab per ledger layer.' + f'{body}\n') + +import pathlib, re +OUT = pathlib.Path(__file__).resolve().parent.parent / "docs" / "assets" / "protocolith" +(OUT / "logo-mark.svg").write_text(svg(False), encoding="utf-8") +(OUT / "logo-mark-dark.svg").write_text(svg(True), encoding="utf-8") +(OUT / "favicon.svg").write_text(svg(False, True).replace("Protocolith mark", "Protocolith favicon"), encoding="utf-8") + +def inner_of(s): + return re.search(r"", s, re.S).group(0) + +DESC_OLD = re.compile(r'.*?', re.S) +DESC_NEW = 'An isometric monolith with an amber P carved in its face, standing on four strata slabs whose edges carry hash-like ticks.' +MARK_OPEN, MARK_CLOSE = "", "" +for name, dark in (("logo.svg", False), ("logo-dark.svg", True)): + path = OUT / name + text = path.read_text(encoding="utf-8") + mark = MARK_OPEN + '' + inner_of(svg(dark)) + "" + MARK_CLOSE + if MARK_OPEN in text: + text = re.sub(re.escape(MARK_OPEN) + ".*?" + re.escape(MARK_CLOSE), lambda m: mark, text, flags=re.S) + else: + i = text.index('') + j = text.index("", i) + text = text[:i] + mark + text[j + 4:] + path.write_text(DESC_OLD.sub(DESC_NEW, text, count=1), encoding="utf-8") + +social = OUT / "social-preview.svg" +text = social.read_text(encoding="utf-8") +mark = MARK_OPEN + '' + inner_of(svg(True)) + "" + MARK_CLOSE +if MARK_OPEN in text: + text = re.sub(re.escape(MARK_OPEN) + ".*?" + re.escape(MARK_CLOSE), lambda m: mark, text, flags=re.S) +else: + i = text.index('') + j = text.index("", i) + text = text[:i] + mark + text[j + 4:] +social.write_text(text, encoding="utf-8") +print("wrote logo assets")