Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · Stars: names, positions, distance and colour

blackBodyColourfunction

The colour of a black body at a temperature, as a #rrggbb string, for drawing a star. It is the colour a camera would show, not a measurement, and it uses an approximation of the black-body locus (good to a few percent between 1,000 and 40,000 K).

Import it

import { blackBodyColour } from "@johnmorrisdotca/hoshi-stars";

Definition

function blackBodyColour(kelvin: number): string

Parameters

NameTypeDescription
kelvinnumber

Temperature in kelvin.

Returns

string

A colour like #a4bdff.

Examples

import { blackBodyColour } from "@johnmorrisdotca/hoshi-stars";

console.log(blackBodyColour(10000), blackBodyColour(3500));
#cadaff #ffc18d

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.7.0.