Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/gui-gtk-4.0/colors.c File Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Functions
colors.c File Reference
`#include <stdio.h>`
`#include <gtk/gtk.h>`
`#include "log.h"`
`#include "mem.h"`
`#include "rgbcolor.h"`
`#include "gui_main.h"`
`#include "colors.h"`

Go to the source code of this file.

## Functions

struct color * | color_alloc (int r, int g, int b)
void | color_free (struct color *color)
int | color_brightness_score (struct color *pcolor)

## Function Documentation

## ◆ color_alloc()

struct color * color_alloc | ( | int | r,
|  | int | g,
|  | int | b
| ) |  |

Allocate a color (well, sort of) and return a pointer to it.

Definition at line 38 of file colors.c.

## ◆ color_brightness_score()

int color_brightness_score | ( | struct color * | pcolor | ) |

Return a number indicating the perceptual brightness of this color relative to others (larger is brighter).

Definition at line 62 of file colors.c.

## ◆ color_free()

void color_free | ( | struct color * | color | ) |

Free a previously allocated color. See color_alloc().

Definition at line 53 of file colors.c.