> For the complete documentation index, see [llms.txt](https://docs.ladybug.tools/hb-radiance-primer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ladybug.tools/hb-radiance-primer/components/2_lightsources/custom_lamp.md).

# Custom Lamp

![](/files/Ba5cyg72zyfXMF7qySix)

![](/files/UMUXwOsjoyRLdkElS0oJ) - [\[source code\]](https://github.com/ladybug-tools/honeybee-grasshopper-radiance/blob/master/honeybee_grasshopper_radiance/src//HB%20Custom%20Lamp.py)

Create a Honeybee CustomLamp.

The CustomLamp can be used to set custom chromaticity, color or color temperature. If only the \_name is set a default CustomLamp of 3200K is created, unless the name is a predefined lamp name.

The priority of input is from the top. This means that if, e.g., both color\_temp\_ and xy\_cor\_ are set by the user, the color temperature have priority and the CustomLamp will be created from the color temperature.

### Inputs

* **name \[Required]**

Set the name of the custom lamp. If the name is among the predefined list of lamp names, the lamp name will override any values in the other inputs. The following lamp names are predefined. The values in parenthesis are the x, y 1931 chromaticity coordinates and lumen depreciation values: clear metal halide (0.396, 0.39, 0.8) cool white (0.376, 0.368, 0.85) cool white deluxe (0.376, 0.368, 0.85) deluxe cool white (0.376, 0.368, 0.85) deluxe warm white (0.44, 0.403, 0.85) fluorescent (0.376, 0.368, 0.85) halogen (0.4234, 0.399, 1) incandescent (0.453, 0.405, 0.95) mercury (0.373, 0.415, 0.8) metal halide (0.396, 0.39, 0.8) quartz (0.424, 0.399, 1) sodium (0.569, 0.421, 0.93) warm white (0.44, 0.403, 0.85) warm white deluxe (0.44, 0.403, 0.85) xenon (0.324, 0.324, 1)

* **color\_temp**

Set the color temperature in Kelvin for the lamp. This is used to calculate the chromaticity coordinates on the CIE 1931 xy diagram. Valid color temperature values are from 1000 to 25000. Will be ignored if the lamp name matches a predefined value.

* **xy\_cor**

Chromaticity coordinates for the lamp. This input must be a list of two values \[x, y]. Will be ignored if color\_temp\_ is supplied. Or if the lamp name matches a predefined value.

* **color\_space**

Color space for the chromaticity coordinates. The values and their corresponding color spaces are 0 - CIE 1931 Color Space (default) 1 - CIE 1960 Color Space 2 - CIE 1976 Color Space

* **rgb\_color**

Specifiy the RGB color for the lamp. This can be a color from the "Colour Swatch" component or a text panel. Any alpha value of the color will be multiplied with the depreciation factor. Will be ignored if color\_temp\_ or xy\_cor\_ are supplied. Or if the lamp name matches a predefined value.

* **depr\_fac**

A scalar multiplier applied to account for lamp lumen depreciation. Must be greater than 0. Default: 1.

### Outputs

* **report**

Reports, errors, warnings, etc.

* **custom\_lamp**

A CustomLamp that can be plugged into a Luminaire.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ladybug.tools/hb-radiance-primer/components/2_lightsources/custom_lamp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
