<commit_before>/*
 * Copyright (c) 2017 大前良介 (OHMAE Ryosuke)
 *
 * This software is released under the MIT License.
 * http://opensource.org/licenses/MIT
 */

package net.mm2d.dmsexplorer.util

import android.graphics.Color
import android.support.annotation.ColorInt
import kotlin.math.roundToInt

/**
 * テーマとしての色を決定するメソッドを持つクラス。
 *
 * @author [大前良介 (OH<NAME>)](mailto:<EMAIL>)
 */
object ColorUtils {
    private const val DARKER_RATIO = 0.7f

    @JvmStatic
    @JvmOverloads
    @ColorInt
    fun getDarkerColor(@ColorInt color: Int, ratio: Float = DARKER_RATIO): Int {
        val a = Color.alpha(color)
        val r = (Color.red(color) * ratio).roundToInt()
        val g = (Color.green(color) * ratio).roundToInt()
        val b = (Color.blue(color) * ratio).roundToInt()
        return Color.argb(a, r, g, b)
    }
}<commit_msg>hotfix<commit_after>/*
 * Copyright (c) 2017 大前良介 (OHMAE Ryosuke)
 *
 * This software is released under the MIT License.
 * http://opensource.org/licenses/MIT
 */

package net.mm2d.dmsexplorer.util

import android.graphics.Color
import android.support.annotation.ColorInt

/**
 * テーマとしての色を決定するメソッドを持つクラス。
 *
 * @author [大前良介 (OHMA<NAME>uke)](mailto:<EMAIL>)
 */
object ColorUtils {
    private const val DARKER_RATIO = 0.7f

    @JvmStatic
    @JvmOverloads
    @ColorInt
    fun getDarkerColor(@ColorInt color: Int, ratio: Float = DARKER_RATIO): Int {
        val a = Color.alpha(color)
        val r = (Color.red(color) * ratio + 0.5f).toInt()
        val g = (Color.green(color) * ratio + 0.5f).toInt()
        val b = (Color.blue(color) * ratio + 0.5f).toInt()
        return Color.argb(a, r, g, b)
    }
}
{'fraction_non_alphanumeric': 0.13608748481166463, 'fraction_numerical': 0.012150668286755772, 'mean_word_length': 3.1802030456852792, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7319174', 'n_tokens_mistral': 655, 'n_tokens_neox': 637, 'n_words': 133}