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

starColourfunction

The colour to draw a star: from its B-V index, or a plain white where the catalogue has none.

Import it

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

Definition

function starColour(star: Star): string

Parameters

NameTypeDescription
starStar

A star.

Returns

string

A #rrggbb string.

Examples

import { starByName, starColour } from "@johnmorrisdotca/hoshi-stars";

console.log(starColour(starByName("Betelgeuse")!), starColour(starByName("Rigel")!));
#ffbc83 #c6d8ff

What it prints (run when this page was built)

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