Exemplo n.º 1
0
def test_init_colorset_by_name():
    """Test the initialization of colorset objects by name."""
    assert len(Colorset.original()) > 1
    assert len(Colorset.nuanced()) > 1
    assert len(Colorset.multi_colored()) > 1
    assert len(Colorset.ecotect()) > 1
    assert len(Colorset.view_study()) > 1
    assert len(Colorset.shadow_study()) > 1
    assert len(Colorset.glare_study()) > 1
    assert len(Colorset.annual_comfort()) > 1
    assert len(Colorset.thermal_comfort()) > 1
    assert len(Colorset.thermal_comfort_utci()) > 1
    assert len(Colorset.heat_sensation()) > 1
    assert len(Colorset.cold_sensation()) > 1
    assert len(Colorset.benefit_harm()) > 1
    assert len(Colorset.harm()) > 1
    assert len(Colorset.benefit()) > 1
    assert len(Colorset.shade_benefit_harm()) > 1
    assert len(Colorset.shade_harm()) > 1
    assert len(Colorset.shade_benefit()) > 1
    assert len(Colorset.energy_balance()) > 1
    assert len(Colorset.energy_balance_storage()) > 1
    assert len(Colorset.therm()) > 1
    assert len(Colorset.cloud_cover()) > 1
    assert len(Colorset.black_to_white()) > 1
    assert len(Colorset.blue_green_red()) > 1
    assert len(Colorset.multicolored_2()) > 1
    assert len(Colorset.multicolored_3()) > 1
Exemplo n.º 2
0
class Colors(Enum):
    """Colors for a legend."""
    annual_comfort = Colorset.annual_comfort()
    benefit = Colorset.benefit()
    benefit_harm = Colorset.benefit_harm()
    black_to_white = Colorset.black_to_white()
    blue_green_red = Colorset.blue_green_red()
    cloud_cover = Colorset.cloud_cover()
    cold_sensation = Colorset.cold_sensation()
    ecotect = Colorset.ecotect()
    energy_balance = Colorset.energy_balance()
    energy_balance_storage = Colorset.energy_balance_storage()
    glare_study = Colorset.glare_study()
    harm = Colorset.harm()
    heat_sensation = Colorset.heat_sensation()
    multi_colored = Colorset.multi_colored()
    multicolored_2 = Colorset.multicolored_2()
    multicolored_3 = Colorset.multicolored_3()
    nuanced = Colorset.nuanced()
    openstudio_palette = Colorset.openstudio_palette()
    original = Colorset.original()
    peak_load_balance = Colorset.peak_load_balance()
    shade_benefit = Colorset.shade_benefit()
    shade_benefit_harm = Colorset.shade_benefit_harm()
    shade_harm = Colorset.shade_harm()
    shadow_study = Colorset.shadow_study()
    therm = Colorset.therm()
    thermal_comfort = Colorset.thermal_comfort()
    view_study = Colorset.view_study()
Exemplo n.º 3
0
    'energy_balance_storage': Colorset.energy_balance_storage(),
    'glare_study': Colorset.glare_study(),
    'harm': Colorset.harm(),
    'heat_sensation': Colorset.heat_sensation(),
    'multi_colored': Colorset.multi_colored(),
    'multicolored_2': Colorset.multicolored_2(),
    'multicolored_3': Colorset.multicolored_3(),
    'nuanced': Colorset.nuanced(),
    'openstudio_palette': Colorset.openstudio_palette(),
    'original': Colorset.original(),
    'peak_load_balance': Colorset.peak_load_balance(),
    'shade_benefit': Colorset.shade_benefit(),
    'shade_benefit_harm': Colorset.shade_benefit_harm(),
    'shade_harm': Colorset.shade_harm(),
    'shadow_study': Colorset.shadow_study(),
    'therm': Colorset.therm(),
    'thermal_comfort': Colorset.thermal_comfort(),
    'view_study': Colorset.view_study()
}


class Text:
    """Text parameters for the legend.

        Args:
            color: A tuple of three integer values for R, G, and B. Defaults (0, 0, 0).
            size: An integer representing the size of fonts in points. Defaults to 30.
            bold: A boolean to specify whether the fonts should be made bold.
                Defaults to False.
        """