Skip to content

Commit 6a336e6

Browse files
authored
Merge pull request JuliaPhysics#35 from schneiderfelipe/cpk-hex-colors
Add CPK coloring
2 parents 77449d9 + 5793ba3 commit 6a336e6

File tree

3 files changed

+118
-3
lines changed

3 files changed

+118
-3
lines changed

src/PeriodicTable.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ struct Element
2323
boil::typeof(1.0K)
2424
category::String
2525
color::String
26+
cpk_hex::String
2627
density::typeof(1.0g/cm^3)
2728
discovered_by::String
2829
el_config::String
@@ -47,6 +48,7 @@ Element(; name::AbstractString="",
4748
boil::typeof(1.0K)=NaN*K,
4849
category::AbstractString="",
4950
color::AbstractString="",
51+
cpk_hex::AbstractString="",
5052
density::typeof(1.0g/cm^3)=NaN*g/cm^3,
5153
discovered_by::AbstractString="",
5254
el_config::AbstractString="",
@@ -63,7 +65,7 @@ Element(; name::AbstractString="",
6365
xpos::Integer=-1,
6466
ypos::Integer=-1,
6567
shells::AbstractVector{<:Integer}=Int[]) =
66-
Element(name, appearance, atomic_mass, boil, category, color, density,
68+
Element(name, appearance, atomic_mass, boil, category, color, cpk_hex, density,
6769
discovered_by, el_config, melt, molar_heat, named_by, number, period, phase,
6870
source, spectral_img, summary, symbol, xpos, ypos, shells)
6971

0 commit comments

Comments
 (0)