# Crystal geometry and sunlight color: scope of the optical layer

The geometric minimum for an ideal periodic crystal is a **primitive repeat cell
with periodic boundary conditions**. It is not a smallest stable free-standing
nanocrystal. A monatomic FCC or BCC primitive cell contains one lattice site; the
FCC conventional cubic cell contains four sites and the BCC conventional cell two.
Repeating the cell supplies the bulk environment. A finite cluster has surfaces,
size-dependent electronic states, and potentially a different structure and color.

The current optical layer reconstructs ideal bulk-surface colors using published
complex refractive indices `N(lambda)=n(lambda)+i k(lambda)`. It does not derive
these electronic-response functions from cell geometry. Gold, silver and copper
can share the FCC structural family while having distinct electronic responses.
Consequently the FCC shape alone cannot select their different colors.

## Sourced data and light

Eleven elements have imported measured-input optical data: Au, Ag, Cu, Ti, V, Cr,
Mn, Fe, Co, Ni and Pd. Johnson–Christy 1972 supplies the noble metals; their 1974
paper supplies the eight transition metals. The inputs are measurements on
room-temperature evaporated films. The 1974 specimens are explicitly
polycrystalline. Effective scalar film optical constants do not establish an
orientation-resolved dielectric tensor of an arbitrary single crystal.

Raw numerical YAML data distributed under CC0 by refractiveindex.info are
preserved with hashes, original citations, source URLs, and a retrieval date.
The exact CIE 1931 two-degree matching functions and D65 spectrum are preserved
with their official metadata, attribution, CC BY-SA 4.0 terms, and verified
published MD5 checksums. The new layer uses those tabulations rather than the
previous analytic observer approximation. Previous outputs remain unchanged.

Two source modes are available: a **5772 K Planck blackbody solar approximation**,
and the **CIE D65 standard daylight spectrum**. Neither is a measurement of sunlight
at a particular location and time. Atmospheric effects, solar absorption lines,
absolute irradiance and adaptation of a particular observer are not recovered.
The output integrates 380–780 nm at 1 nm intervals, with linear interpolation of
the measured n and k. Values outside their tabulated domain are not extrapolated.

## Equations and assumptions

At normal incidence from air, the Fresnel reflected power is

`R(lambda) = ((n-1)^2+k^2)/((n+1)^2+k^2)`.

The optional angle uses the mean of s- and p-polarized Fresnel powers for an
effective isotropic, planar, semi-infinite passive material. The surface is
assumed clean and smooth: oxides, coatings, roughness, finite thickness and
multiple scattering are absent. This makes a bulk swatch and material preview;
it does not solve light scattering by the individually drawn atoms.

For source spectrum S and CIE observer functions, the unadapted tristimulus
components are

`(X,Y,Z) = integral S R (xbar,ybar,zbar) dlambda / integral S ybar dlambda`.

The corresponding perfect-reflector white is computed with R=1. Bradford white
adaptation maps it to D65 for display, followed by standard sRGB conversion.
The raw XYZ values and unclipped linear RGB remain in the output. Gamut clipping
is explicitly flagged; the monitor hex value is not an intrinsic material
property. Color changes with illumination, surroundings, surface finish and
observer conditions. Using white adaptation means illuminant changes are partly
discounted, as in an adapted observer.

The source constants are experimental inputs, the Fresnel propagation and
color integration are established mathematical models, and the resulting colors
are **measured-input reconstructions**. Agreement with the familiar appearance
of gold is not a held-out prediction of its dielectric function. A genuine
geometry-to-color prediction would require an explicitly defined electronic
Hamiltonian and independently validated response calculation, with no fitted
target colors. The higher-dimensional shadow visualization remains a hypothesis
and does not enter these optical equations.

## Bounded result and next test

With identical source and observer settings, the eleven input materials produce
their own spectra. The FCC counterexample is visible at normal incidence:

| Element | R at 450 nm | R at 650 nm | Adapted 5772 K swatch |
|---|---:|---:|---|
| Au | 0.408194 | 0.956522 | #FFDEA3 |
| Ag | 0.980236 | 0.989834 | #FEFDFC |
| Cu | 0.538258 | 0.935218 | #F8CFBF |

These values describe the model above, not all possible samples of each element.
Unsupported optical entries remain uncalculated. In particular, no color is
invented for unstable superheavy crystals or from a decorative periodic-table
category color.

Next: hold out an independently measured reflectance spectrum of a specified
surface and compare the forward spectrum without tuning n,k to that spectrum.
Only after defining an electronic model should geometry-derived dielectric
functions be substituted and tested against the same held-out measurements.

## Primary sources

- Johnson & Christy, 15 December 1972: https://doi.org/10.1103/PhysRevB.6.4370
- Johnson & Christy, 15 June 1974: https://doi.org/10.1103/PhysRevB.9.5056
- CIE observer: https://cie.co.at/datatable/cie-1931-colour-matching-functions-2-degree-observer
- CIE D65: https://cie.co.at/datatable/cie-standard-illuminant-d65
- IAU nominal solar parameter: https://arxiv.org/abs/1510.07674
- Numerical-data distributor documentation: https://doi.org/10.1038/s41597-023-02898-2
