<commit_before>/**
 * Copyright (c) 2021 <NAME>
 * Licensed under the MIT License.
 * See LICENSE file for more information.
 */

#ifndef COLORIZE_H
#define COLORIZE_H

#include "hsv.h"
#include "shaderConfig.h"

/**
 * Creates a smooth HSV color transition from Blue(=0) to Red(=1).
 * The returned value is in RGB space.
 */
FUNC_DECL vec3 colorizeBlueRed(float alpha)
{
    alpha = 1.f - saturate(alpha);
    return hsv2rgb(vec3(alpha * (240.0f / 360.0f), 1, 1));
}

/**
 * Similar to above but from Red(=0) to Green(=1).
 */<commit_msg>add grayscale color map<commit_after>/**
 * Copyright (c) 2021 <NAME>
 * Licensed under the MIT License.
 * See LICENSE file for more information.
 */

#ifndef COLORIZE_H
#define COLORIZE_H

#include "hsv.h"
#include "shaderConfig.h"

/**
 * This is not really a "color" map.
 * It just converts a float to a vec3.
 */
FUNC_DECL vec3 colorizeGray(float alpha)
{
    alpha = saturate(alpha);
    return vec3(alpha,alpha, alpha);
}

/**
 * Creates a smooth HSV color transition from Blue(=0) to Red(=1).
 * The returned value is in RGB space.
 */
FUNC_DECL vec3 colorizeBlueRed(float alpha)
{
    alpha = 1.f - saturate(alpha);
    return hsv2rgb(vec3(alpha * (240.0f / 360.0f), 1, 1));
}

/**
 * Similar to above but from Red(=0) to Green(=1).
 */
{'fraction_non_alphanumeric': 0.13996889580093314, 'fraction_numerical': 0.03654743390357698, 'mean_word_length': 3.5157894736842104, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6792122', 'n_tokens_mistral': 493, 'n_tokens_neox': 456, 'n_words': 151}