# @dioramajs/effects/effect

effect() and defineEffect() without the rest of the effects package.

## Functions and values

- [CSS_COLOR](/docs/api/effects-effect/css-color.md): Colour strings three can parse. In `effect()` a string default that matches becomes a colour param. Keep in sync with `IsCssColor` so '#gallery' stays a string in types and at runtime.
- [defineEffect](/docs/api/diorama/define-effect.md): Checks a definition and returns it as a frozen callable. Registers and loads nothing. Throws `EFFECT_DEFINITION` on a bad definition.
- [effect](/docs/api/diorama/effect.md): Short form of `defineEffect`: defaults, optional options, setup. An unnamed effect takes its registry key (the file name when a build plugin finds it).
- [INPUTS](/docs/api/effects-effect/inputs.md): The input uniforms of `ctx.u`.
- [isParamDefault](/docs/api/effects-effect/is-param-default.md): Whether `defineEffect` accepts this as a param default.
- [oneOf](/docs/api/effects-effect/one-of.md): String param limited to these values, the first one the default. The same as `oneOf` of the light entry, for effect modules, which must not import it.
- [problems](/docs/api/effects-effect/problems.md): What is wrong with a definition, empty when nothing is.

## Types

- [ColorsIn](/docs/api/effects-effect/types/colors-in.md): The spec as setup sees it, with colour strings turned into colour params.
- [IsCssColor](/docs/api/effects-effect/types/is-css-color.md): True for '#rgb', '#rgba', '#rrggbb', '#rrggbbaa' and rgb()/hsl() strings.
