  In this paper we report on the analysis of all the available optical and very
high-energy $\gamma$-ray ($>$200 GeV) data for the BL Lac object PKS
2155$-$304, collected simultaneously with the ATOM and H.E.S.S. telescopes from
2007 until 2009. This study also includes X-ray (RXTE, Swift) and high-energy
$\gamma$-ray (Fermi-LAT) data. During the period analysed, the source was
transitioning from its flaring to quiescent optical states,and was
characterized by only moderate flux changes at different wavelengths on the
timescales of days and months. A flattening of the optical continuum with an
increasing optical flux can be noted in the collected dataset, but only
occasionally and only at higher flux levels. We did not find any universal
relation between the very high-energy $\gamma$-ray and optical flux changes on
the timescales from days and weeks up to several years. On the other hand, we
noted that at higher flux levels the source can follow two distinct tracks in
the optical flux-colour diagrams, which seem to be related to distinct
$\gamma$-ray states of the blazar. The obtained results therefore indicate a
complex scaling between the optical and $\gamma$-ray emission of PKS
2155$-$304, with different correlation patterns holding at different epochs,
and a $\gamma$-ray flux depending on the combination of an optical flux and
colour rather than a flux alone.
