Reference · Stars: names, positions, distance and colour
starTemperatureKfunction
The surface temperature a colour index implies, in kelvin, by Ballesteros's relation between B-V and a black body. It is an estimate to a few hundred kelvin for most stars, and it runs cool for the hottest (about 16,600 K at -0.3).
Import it
import { starTemperatureK } from "@johnmorrisdotca/hoshi-stars";
Definition
function starTemperatureK(colourIndex: number): number
Parameters
| Name | Type | Description |
|---|---|---|
colourIndex | number | B-V in magnitudes. |
Returns
number
Kelvin.
Examples
import { starTemperatureK } from "@johnmorrisdotca/hoshi-stars";
console.log(Math.round(starTemperatureK(0.65)));5778What it prints (run when this page was built)