You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: colorization.rs
    path of file: ./repos/tabled/tabled/src/settings/themes
    
    the code of the file until where you have to start completion: use crate::{
    grid::{
        ansi::ANSIBuf,
        config::{ColoredConfig, Entity, Sides},
        records::{ExactRecords, Records},
    },
    settings::{object::Object, Color, TableOption},
};

/// [`Colorization`] sets a color for the 
    
    fn change(self, records: &mut R, cfg: &mut ColoredConfig, _: &mut D) {
        if self.colors.is_empty() {
            return;
        }

        let count_columns = records.count_columns();
        let count_rows = records.count_rows();

        match self.pattern {
            ColorizationPattern::Column => colorize_columns(&self.colors, count_columns, cfg),
            ColorizationPattern::Row => colorize_rows(&self.colors, count_rows, cfg),
            ColorizationPattern::ByRow => {
                colorize_by_row(&self.colors, count_rows, count_columns, cfg)
            }
            ColorizationPattern::ByColumn => {
                colorize_by_column(&self.colors, count_rows, count_columns, cfg)
            }
            ColorizationPattern::Chess => {
                colorize_diogonals(&self.colors, count_rows, count_columns, cfg)
            }
        }
    }