Skip to main content

A Package containing the corporate design colors 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

Installation

pip install FHcolors

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

#generate testdata
y1 = 23+np.random.randn(100)
y2 = 23.5 + np.random.randn(100)
y = y1.tolist()+y2.tolist()
x1 = np.ones_like(y1)
x2 = np.ones_like(y1)*2
x = x1.tolist()+x2.tolist()


sns.boxplot(x=x, y=y, palette=sns.color_palette([colors.green1, colors.blue1]))
sns.swarmplot(x=x, y=y,color='k')
plt.xlabel('Group')
plt.ylabel('Eta /%')
plt.tight_layout()
plt.savefig('Boxplot_Eta.png')
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-2.1.4.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file FHColors-2.1.4.tar.gz.

File metadata

  • Download URL: FHColors-2.1.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.1

File hashes

Hashes for FHColors-2.1.4.tar.gz
Algorithm Hash digest
SHA256 03f18fc1835c2bd80974056a42189bbc5a210ed448f841c18d88d186ac4c73ff
MD5 034630d2bcc33bf241ac8f6ea4fd7762
BLAKE2b-256 22fe0af50f0c3fc91ee7cd8b63188f94ca4968eb134fe8327baecb68db638c26

See more details on using hashes here.

Supported by

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