semvec/pypi-packages huggingface dataset:
colortool 0.6.0
set of tools to work with different color formats
Requires Python: >=3.8

# colortool
set of tools to work with different color formats

## install from [pypi](https://pypi.org/project/colortool/)
```shell
pip install colortool
```

## examples
```python
>>> from colortool import Color

```

### convert color to different formats
```python
>>> green = Color.from_hex(0x00FF00)
>>> green.css_hex
'#00FF00'
>>> green.rgb_int
(0, 255, 0)
>>> green.rgb_float
(0.0, 1.0, 0.0)
>>> green.hsl
(0.33333333333333, 1.0, 0.5)

```

### create color from different formats
```python
>>> Color.from_css_hex('#00FF00')
Color(0x00FF00)
>>> Color.from_rgb_int((0, 255, 0))
Color(0x00FF00)
>>> Color.from_rgb_float((0.0, 1.0, 0.0))
Color(0x00FF00)
>>> Color.from_hsl((0.3333333333333333, 1.0, 0.5))
Color(0x00FF00)

```

### rgba colors
```python
>>> Color.from_rgba_int_float((0, 255, 0, 0.5))
Color(0x00FF00, alpha=0.5)

>>> Color.from_rgba_int_float((0, 255, 0, 0.5)).css_rgb
'rgba(0, 255, 0, 0.5)'

```

```python
### convert RGBA color on RGB background to RGB color
>>> Color.from_background_and_color_alpha(
...     background=Color(0x00FF00),
...     color=Color(0x000000,alpha=0.5),
... )
Color(0x007F00)

```

### make color darker or lighter
```python
>>> green.darker(ratio=0.5) # lightness = lightness * ratio
Color(0x007F00)
>>> green.lighter(ratio=0.5) # lightness = lightness + (1 - lightness) * ratio
Color(0x7FFF7F)

```
###  [determine the font color to be either black or white depending on the background color](https://css-tricks.com/switch-font-color-for-different-backgrounds-with-css/)
```python
>>> white = Color(0xFFFFFF)
>>> black = Color(0x000000)
>>> white.font_color()
Color(0x000000)
>>> black.font_color()
Color(0xFFFFFF)
>>> green.font_color()
Color(0x000000)

```

### also return darker variation of color if it is really light (see same css-tricks article)
```python
>>> green.font_border_colors()
(Color(0x000000), Color(0x00FF00))

```
sitePS 0.0.1
Phylogenetic positioning of amino acid sites in human proteins
Requires Python: >=3.9

Target: Input a human gene sequence and output the phylogenetic age of each amino acid position in the sequence.

eg:

`from sitePS_dabaixian import sitePS`

`sitePS(query_name, output_name, evalue, threads, add, delete)`

`query_name` and `output_name` are necessary, they are string types, that is, the name of the input query file and the name of the file to be output. `evlaue` and `threads` are also string types but are optional. They default to 1e-4 and 64 respectively. `add` represents adding species, which is a string type and is the name of a file. `delete` represents removing some species and is a list type. Similar to [22,23,25]

If you want to add species
You need to give a file, the content of the file is as follows
`1328070,20,Prolemur simus`
`379532,20,Propithecus coquereli`
`10029,19,Cricetulus griseus`
`10181,19,Heterocephalus glaber`

We automatically use blast to compare the species in our library with the query. Based on the comparison results, we query each layer layer by layer from 27 downwards to see whether the site is consistent with the human amino acid. If there is no amino acid position consistent with human beings in the n layer, no further progress will be made. The position will be located in the n+1 layer.

`msa_plot` supports visualizing the csv results output by `sitePS`
msa_plot(out_csv, png, namelist: str = 'Basic_101species_name.list', plot_length: int = 120, plot_dpi: int = 500)
`out_csv` is the csv output by `sitePS`, `png` is the name of the picture you want to output, `namelist` is the default Basic_101species_name.list, `plot_length` is the length of each line of the msa result you want to output, `plot_dpi` is the dpi of the output picture