Skip to main content

A Package containing the corporate design colers of Fraunhofer Gesellschaft

Project description

FHColors

A Package containing the corporate design colers of Fraunhofer Gesellschaft

Colors

import FHColors as fhc

print(fhc.colors.green1)

returns

array([0.09019608, 0.61176471, 0.49019608, 1.        ])

available colors are:

  • green1
  • orange1
  • blue1
  • red1
  • green2
  • orange2
  • blue2
  • grey1
  • grey2

Maps

print(fhc.maps.BlackToGreenToWhite(.5))

returns

(0.2497071555895085, 0.6798319327731093, 0.5795772854596384, 1.0)

available maps are:

  • BlackToGreen
  • WhiteToGreen
  • GreenToWhite
  • OrangeToGreen
  • GreenToOrange
  • BlackToGreenToOrangeToWhite
  • BlackToGreenToWhite
  • BlackToGreenToWhite_short
  • colors

Example 1

from FHColors import colors, maps
import numpy as np
import matplotlib.pyplot as plt

maps=[
    maps.BlackToGreen,
    maps.GreenToWhite,
    maps.GreenToOrange,
    maps.BlackToGreenToOrangeToWhite,
    maps.BlackToGreenToWhite,
    maps.BlackToGreenToWhite_short,
    maps.colors]
mapnames=[
    'maps.BlackToGreen',
    'maps.GreenToWhite',
    'maps.GreenToOrange',
    'maps.BlackToGreenToOrangeToWhite',
    'maps.BlackToGreenToWhite',
    'maps.BlackToGreenToWhite_short',
    'maps.colors']
fig,axes=plt.subplots(nrows=len(maps), ncols=1)
fig.set_figheight(20)
fig.patch.set_facecolor(colors.grey1)
for ii,m in enumerate(maps):
    for i in np.arange(0,256,1):
        light=np.sum(m(i)[:3])/3
        axes[ii].plot([i],[light], 'o', markersize=30, color=m(i))
    axes[ii].set_xlabel('Colorvalue')
    axes[ii].set_ylabel('Brightness')
    axes[ii].title.set_text(mapnames[ii])
    axes[ii].patch.set_facecolor(colors.grey1)
plt.tight_layout(pad=3)
plt.savefig('maps.png',facecolor=fig.get_facecolor(), edgecolor='none')
plt.show()

Example 2

import seaborn as sns

df = sns.load_dataset('iris')

sns.boxplot(
    data=df,
    x='species',
    y='sepal_length',
    palette=sns.color_palette([colors.orange1,colors.green1,colors.green1]))
fig=plt.gcf()
ax=plt.gca()
ax.set_title('Highlighting Setosa')
fig.patch.set_facecolor(colors.grey1)
ax.patch.set_facecolor(colors.grey1)
plt.tight_layout()
#plt.savefig('Boxplot_Eta_corr.png',facecolor=fig.get_facecolor(), edgecolor='none')
plt.show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FHColors-1.0.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

FHColors-1.0.1-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page